#include <QCoreApplication>
#include <QDebug>
#include <iostream>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    int age  = 0;
    qInfo()<<"Enter Your age";
    std::cin>>age;

    if(age==0) qFatal("Not a valid age");

    qInfo()<<"Your enterd:"<<age;
    if(age<18)
    {
        qInfo()<<"You are NOT an adult!";
        qInfo()<<"Come back when you are older!!!";
    }


    if(age<21&&age>=18) qInfo()<<"You are not REALLY an adult yet!";

    if(age>=21) qInfo()<<"You are an adult";

    if(age>120) qCritical()<<"How can you be that old!!";

    qInfo()<<"Done";

    return a.exec();
}
